import { Controller, Get, Post, Body, Patch, Param, Delete, Query, Req,Headers } from '@nestjs/common';
import { MainlyCategoryService } from './mainly-category.service';
import { CreateMainlyCategoryDto, DeleteMainlyCategoryDto, EditMainlyCategoryDto, FindUserAllDto } from './dto/mainly-category.dto';
import { ApiTags } from '@nestjs/swagger';

@ApiTags('主页分类')
@Controller('mainly-category')
export class MainlyCategoryController {
  constructor(private readonly mainlyCategoryService: MainlyCategoryService) { }

  @Post('create')
  create(@Body() cmcd: CreateMainlyCategoryDto) {
    return this.mainlyCategoryService.create(cmcd);
  }

  @Post('edit')
  edit(@Body() emcd: EditMainlyCategoryDto) {
    return this.mainlyCategoryService.edit(emcd);
  }

  @Post('delete')
  delete(@Body() dmcd: DeleteMainlyCategoryDto) {
    return this.mainlyCategoryService.delete(dmcd);
  }

  @Post('userAll')
  findUserAll(@Body() fuad: FindUserAllDto) {
    return this.mainlyCategoryService.findUserAll(fuad);
  }
}
